﻿namespace SADev.SharePointHolidayLoader
{
    using System.Collections.Generic;
    using System.Windows;

    /// <summary>
    /// Interaction logic for SelectCountryWindow.xaml
    /// </summary>
    public partial class SelectCountryWindow : Window
    {
        public string SelectedCountry { get; private set; }

        public SelectCountryWindow(IEnumerable<string> countries)
        {
            InitializeComponent();
            countryComboBox.ItemsSource = countries;
            countryComboBox.SelectedIndex = 0;
        }

        private void CloseEvent(object sender, RoutedEventArgs e)
        {
            this.SelectedCountry = (string)countryComboBox.SelectedItem;
            this.Close();
        }
    }
}
